//
//  JXTabbarVC.m
//  JXAddressApp
//
//  Created by zhhw_home on 2018/10/25.
//  Copyright © 2018年 zhhw_home. All rights reserved.
//

#import "JXTabbarVC.h"
#import "JXHomeMapViewController.h"
#import "JXAddressDynamicPageViewController.h"
#import "JXBusinessTabViewController.h"
#import "JXMeTabViewController.h"
#import "UIColor+QMUI.h"

@interface JXTabbarVC ()

@end

@implementation JXTabbarVC

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    [self initTabbar];
}
    
- (void)initTabbar
{
    self.tabBar.tintColor = [UIColor qmui_colorWithHexString:@"#333333"];
    
    JXHomeMapViewController *homeVC = [JXHomeMapViewController new];
    homeVC.tabBarItem.selectedImage = [[UIImage imageNamed:@"tabbar_map"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    homeVC.tabBarItem.image = [UIImage imageNamed:@"tabbar_map_unselected"];
    homeVC.tabBarItem.title = @"地名查询";
    
    JXAddressDynamicPageViewController *addressVC = [JXAddressDynamicPageViewController defaultViewController];
    addressVC.tabBarItem.selectedImage = [[UIImage imageNamed:@"tabbar_showplace"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    addressVC.tabBarItem.image = [UIImage imageNamed:@"tabbar_showplace_unselected"];
    addressVC.tabBarItem.title = @"地名动态";
    
    JXBusinessTabViewController *businessVC = [JXBusinessTabViewController defaultViewController];
    businessVC.tabBarItem.selectedImage = [[UIImage imageNamed:@"tabbar_business_selected"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    businessVC.tabBarItem.image = [UIImage imageNamed:@"tabbar_business"];
    businessVC.tabBarItem.title = @"民政业务";
    
    JXMeTabViewController *meVC = [JXMeTabViewController new];
    meVC.tabBarItem.selectedImage = [[UIImage imageNamed:@"tabbar_me_unselected"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    meVC.tabBarItem.image = [UIImage imageNamed:@"tabbar_me"];
    meVC.tabBarItem.title = @"公众互动";
    
    self.viewControllers = @[homeVC, addressVC, businessVC, meVC];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
